<template>
    <div>
        <h1>111</h1>
      <p>{{ currentTime }}</p>
      <slot></slot>
    </div>
  </template>
  
  <script>
  export default {
    name: "TestSj",
  
    data() {
      return {
        currentTime: "",
      };
    },
  
    mounted() {
      this.setCurrentTime();
      setInterval(this.setCurrentTime, 1000);
    },
  
    methods: {
      setCurrentTime() {
        const date = new Date();
        const hour = date.getHours().toString().padStart(2, "0");
        const minute = date.getMinutes().toString().padStart(2, "0");
        const second = date.getSeconds().toString().padStart(2, "0");
        this.currentTime = `${hour}:${minute}:${second}`;
      },
    },
  };
  </script>
  
  <style lang="scss" scoped>
  </style>
  